/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufrn.engcomp.mpc.domain;

import br.ufrn.engcomp.mpc.domain.exceptions.PlantCommunicationException;
import org.apache.commons.math.linear.RealMatrix;

/**
 *
 * @author Felipe
 */
public interface Plant {

    public RealMatrix getAMatrix();
    public RealMatrix getBMatrix();
    public RealMatrix getCMatrix();
    public double[] getInputOP();
    public double[] getStateOP();
//    public Constraints getConstraints();
    
    public void setAMatrix(RealMatrix aMatrix);
    public void setBMatrix(RealMatrix bMatrix);
    public void setCMatrix(RealMatrix cMatrix);
    public void setInputOP(double[] inputOP);
    public void setStateOP(double[] stateOP);
//    public void setConstraints(Constraints constraints);

    public boolean isConstrained();

    public double[] computeXModel(double[] lastX, double[] lastU);
    public double[] computeYModel(double[] lastX);

    public void connect(String ip, int port) throws PlantCommunicationException;
    public void shutdown() throws PlantCommunicationException;

    public void applyInput(double u) throws PlantCommunicationException;
    public double[] readOutput() throws PlantCommunicationException;
    
    public String getCodeName();

}
